Skip to content

Conversation

@rjernst
Copy link
Member

@rjernst rjernst commented Jun 30, 2025

When return an error from Elasticsearch exceptions may contain values written as http response headers. ElasticsearchException contains a map of headers that are added to the response. But these values are also written to a special "header" section of the response body.

This commit renames the existing "headers" in ElasticsearchException to "body headers", which are both http headers and written to the response body. A new "http headers" is added for headers that should only be written as response headers.

When return an error from Elasticsearch exceptions may contain values
written as http response headers. ElasticsearchException contains a map
of headers that are added to the response. But these values are also
written to a special "header" section of the response body.

This commit renames the existing "headers" in ElasticsearchException to
"body headers", which are both http headers and written to the response
body. A new "http headers" is added for headers that should only be
written as response headers.
@rjernst rjernst requested a review from a team as a code owner June 30, 2025 18:16
@rjernst rjernst added :Core/Infra/REST API REST infrastructure and utilities >refactoring labels Jun 30, 2025
@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team v9.2.0 labels Jun 30, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@rjernst rjernst requested review from DaveCTurner and removed request for a team June 30, 2025 18:16
@rjernst rjernst merged commit 4b7de2f into elastic:main Jul 1, 2025
32 checks passed
@rjernst rjernst deleted the exception/http_headers branch July 1, 2025 22:03
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 2, 2025
When return an error from Elasticsearch exceptions may contain values
written as http response headers. ElasticsearchException contains a map
of headers that are added to the response. But these values are also
written to a special "header" section of the response body.

This commit renames the existing "headers" in ElasticsearchException to
"body headers", which are both http headers and written to the response
body. A new "http headers" is added for headers that should only be
written as response headers.
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 3, 2025
When return an error from Elasticsearch exceptions may contain values
written as http response headers. ElasticsearchException contains a map
of headers that are added to the response. But these values are also
written to a special "header" section of the response body.

This commit renames the existing "headers" in ElasticsearchException to
"body headers", which are both http headers and written to the response
body. A new "http headers" is added for headers that should only be
written as response headers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/REST API REST infrastructure and utilities >refactoring Team:Core/Infra Meta label for core/infra team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants